const express = require('express');

const user = express.Router();

const service = require('./service.js');

console.log(service.checkName);

user.get('/books',service.getAllBooks);

user.post('/books',service.addBook);

user.get('/books/:id',service.toEditBook);

user.get('/books/book/:name',service.checkName);

user.put('/books/:id',service.editBook);

user.delete('/books/:id',service.deleteBook);

module.exports = user;